import Vue from 'vue'
import Router from 'vue-router'
import Enter from '@/components/enter'
import Register from '@/components/register'
import home from '@/components/home'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: Enter
    },
    {
      path: '/register',
      name: 'register',
      component: Register
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      children: [
        {
          path: '/news',
          component: resolve => require(['../components/home/news'], resolve)
        },
        {
          path: '/manager',
          component: resolve => require(['../components/home/manager'], resolve)
        },
        {
          path: '/income',
          component: resolve => require(['../components/home/income'], resolve)
        },
        {
          path: '/memo',
          component: resolve => require(['../components/home/memo'], resolve)
        },
        {
          path: '/investment',
          component: resolve => require(['../components/home/investment'], resolve)
        },
        {
          path: '/account',
          component: resolve => require(['../components/home/account'], resolve)
        }
      ]
    }
  ]
})
